<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace app\admin\model;

class Model
{
    protected $name = "longbing_admin_goods_order";
    public function createUserRole($data)
    {
        $data["ur_id"] = uuid();
        $data["create_time"] = $this->time();
        return $this->save($data);
    }
    public function register()
    {
    }
    public function createAttach($data)
    {
        $data["module_upload_dir"] = 0;
        $data["displayorder"] = 0;
        $data["group_id"] = !empty($data["group_id"]) ? $data["group_id"] : 0;
        $result = $this->save($data);
        $result = !empty($result);
        return $result;
    }
    public function updateAttach($filter, $data)
    {
        $result = $this->where($filter)->update($data);
        $result = !empty($result);
        return $result;
    }
    public function listAttach()
    {
    }
    public function listAttachCount()
    {
    }
    public function addAttach()
    {
    }
    public function getAttach($filter)
    {
        $result = $this->where($filter)->find();
        if(!empty($result)) {
            $result = $result->toArray();
        }
        return $result;
    }
    public function delAttach($filter)
    {
        return $this->destoryAttach($filter);
    }
    public function destoryAttach($filter)
    {
        $result = $this->withSearch(["ids"], $filter)->delete();
        return !empty($result);
    }
}

?>